import React from 'react';
import { useHistory, useLocation } from "react-router-dom";
import { NavBar, Icon,Button } from 'zarm';
const Index = () => {
  const history = useHistory();
  const location = useLocation();
  const fn = () => {
    localStorage.setItem("token", 123);
    console.log(history);
    console.log(location);
    // history.push(location.state.url);
    history.push("/home/mine");
  }
  return (
    <>
      <NavBar
        left={<Icon type="arrow-left" onClick={() => window.history.back()} />}
        title="登录"
        style={{ backgroundColor: '#e54847', color: "#fff" }}
      />
       <Button theme="primary" onClick={fn}>登录</Button>
    </>
  );
}

export default Index;